/**
 * Created by WangLi on 2017/5/12.
 */
var bridge;
if (browser.isInApp) {
    if (browser.versions.android) {
        document.write("<script type=\"text/javascript\"  src=\"./bridge/jsb.js\" ></script>");
    } else if (browser.versions.iPhone || browser.versions.iPad) {
        document.write("<script type=\"text/javascript\"  src=\"./bridge/JavascriptBridge.js\" ></script>");
        document.write("<script type=\"text/javascript\"  src=\"./bridge/WebViewJavascriptBridge.js\" ></script>");
    }
    document.write("<script type=\"text/javascript\"  src=\"./bridge/Func.js\" ></script>");
	// document.addEventListener("DOMContentLoaded",function(){
	// 	Func.getBridge(function (_bridge) {
	// 		bridge = _bridge;
	// 		Func.registerHanderBridge('callbackToken',callbackToken)
	// 		//在这里去请求app的token
	// 		alert("token"+localStorage.mi_token)
	// 		if(!localStorage.mi_token){
	// 			alert("token空");
	// 			Func.callHander(bridge,"reqToken",{});
	// 		}
	// 	});
	// });
}

